﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UNSWThink
{
   /// <summary>
   /// Object that represents a Question entry in the database
   /// </summary>
   public class Question
   {
      private int id;
      private int classID;
      private int number;
      private string description;
      private QuestionType type;
      private string image;

      /// <summary>
      /// Default constructor
      /// </summary>
      public Question()
      {
         id = 0;
         classID = 0;
         number = 0;
         description = String.Empty;
         type = QuestionType.OPN;
         image = String.Empty;
      }

      /// <summary>
      /// Alternate constructor
      /// </summary>
      /// <param name="id">
      /// ID of the record
      /// </param>
      /// <param name="classID">
      /// ID of the related class
      /// </param>
      /// <param name="number">
      /// The question's number
      /// </param>
      /// <param name="description">
      /// Descripton of the question
      /// </param>
      /// <param name="type">
      /// The question's type
      /// </param>
      /// <param name="image">
      /// The image file path that is related to this question
      /// (Optional: The database defaults to "NONE" if the string is emtpy)
      /// </param>
      public Question(int id, int classID, int number, string description, QuestionType type, string image)
      {
         this.id = id;
         this.classID = classID;
         this.number = number;
         this.description = description;
         this.type = type;
         this.image = image;
      }

      /// <summary>
      /// Gets or sets the ID
      /// </summary>
      public int ID
      {
         get
         {
            return id;
         }
         set
         {
            id = value;
         }
      }

      /// <summary>
      /// Gets or sets the class ID
      /// </summary>
      public int Class
      {
         get
         {
            return classID;
         }
         set
         {
            classID = value;
         }
      }

      /// <summary>
      /// Gets or sets the question number
      /// </summary>
      public int Number
      {
         get
         {
            return number;
         }
         set
         {
            number = value;
         }
      }

      /// <summary>
      /// Gets or sets the question type
      /// </summary>
      public QuestionType Type
      {
         get
         {
            return type;
         }
         set
         {
            type = value;
         }
      }

      /// <summary>
      /// Gets or sets the description
      /// </summary>
      public string Description
      {
         get
         {
            return description;
         }
         set
         {
            description = value;
         }
      }

      /// <summary>
      /// Gets or sets the image file path
      /// </summary>
      public string Image
      {
         get
         {
            return image;
         }
         set
         {
            image = value;
         }
      }
   }
}
